﻿using System.Collections.Generic;
using System.ServiceModel;
using System.ServiceModel.Web;
using Application.Core.EntityService;
using Application.Core.ErrorHandlers;
using Domain.MainModule.Entities;

namespace Application.MainModule.UserManagement
{
    [ServiceContract]
    public interface IUserManagementService : IBaseService<Customers,int>
    {
        [OperationContract()]
        [FaultContract(typeof(ApplicationServiceError))]
        [WebGet(BodyStyle = WebMessageBodyStyle.WrappedResponse, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        IEnumerable<Customers> GetUsers();

        [OperationContract]
        bool ValidateUser(string userName, string password);
        [OperationContract]
        Customers GetCanonicalUser(int customerId);
        [OperationContract]
        Customers GetCanonicalUser(string authorizationId);
        [OperationContract]
        Customers CreateUser(string userName, string password, string email);

        [OperationContract]
        Customers CreateUser(string userName, string authorizationId);

        [OperationContract]
        bool ChangePassword(string userName, string oldPassword, string newPassword);
    }
}
